import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/Layout.vue')
}

const routes: RouteRecordRaw[] = [
  {
    path: '/demo1-page1',
    component: Layout,
    meta: {
      title: '示例菜单一',
      icon: 'i-ion:apps',
    },
    children: [
      {
        path: 'page1',
        component: () => import('@/views/demo1/Page1.vue'),
        children: [],
        meta: {
          title: '示例界面一',
          icon: 'i-uim:chart-pie',
        },
      },
      {
        path: 'page2',
        component: () => import('@/views/demo1/Page2.vue'),
        children: [],
        meta: {
          title: '示例界面二',
          icon: 'i-uim:chart',
        },
      },
    ],
  },
  {
    path: '/demo1-page2',
    component: Layout,
    meta: {
      title: '示例菜单二',
      icon: 'i-uim:bing',
    },
    children: [
      {
        path: 'page3',
        component: () => import('@/views/demo1/Page3.vue'),
        children: [],
        meta: {
          title: '示例界面一',
          icon: 'i-tabler:contrast-2-filled',
          link: '',
        },
      },
      {
        path: 'page4',
        component: () => import('@/views/demo1/Page4.vue'),
        children: [],
        meta: {
          title: '示例界面二',
          icon: 'i-flowbite:calendar-month-solid',
          link: '',
        },
      },
    ],
  },
  {
    path: '/demo1-page3',
    component: Layout,
    redirect: '/demo1-page3/index',
    meta: {
      title: '示例界面',
      icon: 'i-ph:battery-vertical-high-fill',
    },
    children: [{
      path: 'index',
      component: () => import('@/views/demo1/Page7.vue'),
      children: [],
      meta: {
        breadcrumb: false,
        activeMenu: '/demo1-page3',
        menu: false,
        title: '示例界面',
      },
    }],
  },
  {
    path: '/demo1-page4',
    component: Layout,
    meta: {
      title: '示例菜单四',
      icon: 'i-tabler:brand-youtube-filled',
    },
    children: [
      {
        path: 'page5',
        component: () => import('@/views/demo1/Page5.vue'),
        children: [],
        meta: {
          title: '示例界面一',
          icon: 'i-flowbite:cash-solid',
          link: '',
        },
      },
      {
        path: 'page6',
        component: () => import('@/views/demo1/Page6.vue'),
        children: [],
        meta: {
          title: '示例界面二',
          icon: 'i-flowbite:rectangle-list-solid',
          link: '',
        },
      },
    ],
  },
]

export default routes
